<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>可可文章管理系统</title>
<link href="../template/css/ke.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://img.kekenet.com/statics/js/jquery.min.js"></script>
</head>
<body>
<!-- main -->
<div>
<div class="issCont">
  <div class="ic_TabNav">
    <ul>
      <li class="ic_TabNav_tab"><a href="#" class="tab_font">{{$curr_info['catname']}}管理</a><a href="#" class="tab_close"></a></li>
    </ul>
  </div>

  <div class="SelectTab">
    <h1 class="SelectTab_title">选择栏目：</h1>
    <p class="gree">
	{{foreach from=$sub_cats item=c}}
	  
	  <a href="../index.php/category.index?pid={{$pid}}&cid={{$c['catid']}}"><span {{if $cid==$c['catid']}}class="a_font"{{/if}}>{{$c['catname']}}</span></a> | 
	{{/foreach}}
	</p>
	{{if $cil_cats}}
    <p class="blue">
	{{foreach from=$cil_cats item=c}}
	  <a href="../index.php/category.index?pid={{$pid}}&cid={{$cid}}&catid={{$c['catid']}}"><span {{if in_array($catid, explode(',',$c['arrchildid']))}}class="a_font"{{/if}}>{{$c['catname']}}</span></a> | 
	{{/foreach}}
	</p>
	{{/if}}
  </div>
  
  <div class="table">
    <div class="table_column">
    	
					
      <h1 class="tc_title">
      	{{if $is_end}}
      	<a href="detail.add?pid={{$pid}}&cid={{$cid}}&catid={{$catid}}">添加文章</a>
      	{{/if}}
      	{{$curr_info['catname']}} (共{{$count|default:'0'}}篇)
      </h1>
      <!-- <div class="search"><input name="" type="text" class="sendbox_search" /><input name="" type="button" value="搜索" class="botton_search" /></div> -->
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="table_header"><input type="checkbox" value="" id="check_box" onclick="selectall('check_box','sel[]');" /></td>
		<td class="table_header">ID</td>
        <td class="table_header">标题</td>
        <td align="center" class="table_header">编辑</td>
        <td align="center" class="table_header">点击量</td>
        <td align="center" class="table_header">状态</td>
        <td align="center" class="table_header">发布人</td>
        <td align="center" class="table_header">发布时间</td>
        <td align="center" class="table_header">预览</td>
        <td align="center" class="table_header"></td>
      </tr>
      
      {{foreach from=$artlist item=c}}
      <tr onmouseOver="this.style.backgroundColor='#e9f0ff';" onmouseout="this.style.backgroundColor='#fff';">
        <td><input type="checkbox" name="sel[]" value="{{$c['id']}}" /></td>
        <td>{{$c['id']}}</td>
				<!-- <td><a href="../index.php/category.index?pid={{$pid}}&cid={{$c['cat_info']['parentid']}}&catid={{$c['cat_info']['catid']}}" class="link_gree">[{{$c['cat_info']['catname']}}]</a><a href="../index.php/detail.edit?pid={{$c['cat_info']['parentid']}}&id={{$c['id']}}"> {{$c['title']}}</a></td> -->
				<td>
					{{if !$is_end}}
					<a href="../index.php/category.index?pid={{$pid}}&cid={{$c['cat_info']['parentid']}}&catid={{$c['cat_info']['catid']}}" class="link_gree">[{{$c['cat_info']['catname']}}]</a>
					{{/if}}
					<a href="http://www.kekenet.com/{{$c['url']}}" target="_blank"> {{$c['title']|truncate:40:''}}</a>
				</td>
        <td align="center"><a href="../index.php/detail.edit?pid={{$c['cat_info']['arrparentid'][1]|default:''}}&cid={{$c['cat_info']['arrparentid'][2]|default:''}}&catid={{$c['cat_info']['catid']}}&id={{$c['id']}}"><img src="http://img.kekenet.com/cms/images/icon_edit.gif" width="13" height="13" /></a></td>
        <td align="center">{{$c['hits']}}</td>
        <td align="center">{{$c['status']}}</td>
        <td align="center">{{$c['username']}}</td>
        <td align="center">{{date('Y-m-d H:i:s',$c['inputtime'])}}</td>
        <td align="center"><a href="../index.php/detail.index?id={{$c['id']}}&do=preview" target="preview"><img src="http://img.kekenet.com/statics/images/admin_img/onSuccess.gif" width="22" height="22" /></a></td>
        <td align="center"><a href="../index.php/detail.del?pid={{$c['cat_info']['parentid']}}&id={{$c['id']}}">删除</a></td>
      </tr>
      {{/foreach}}
    </table>
    
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_footer">
      <tr>
        <td><input type="checkbox" value="" id="check_box_1" onclick="selectall('check_box_1','sel[]');" class="input_none" /></td>
        <td><a style="color:#fff;" target="preview" href="../index.php/category.index?pid={{$pid}}&cid={{$cid}}&catid={{$catid}}&do=preview">预览当前栏目</a></td>
        <td><input id="make_current_btn" type="button" value="生成当前栏目" /></td>
        <td><input id="make_select_btn" type="button" value="生成选中的内容" /></td>
        <td><input id="make_all_btn" type="button" value="生成当前栏目内容" /></td>
      </tr>
    </table>
    
	{{if $max_page>1}}
    <div class="paging">
	{{foreach from=$pages item=c}}
	  <a href="../index.php/category.index?pid={{$pid}}&cid={{$cid}}&catid={{$catid}}&page={{$c}}">{{if $c==$page}}<strong>{{$c}}</strong>{{else}}{{$c}}{{/if}}</a> 
	{{/foreach}}
	 <strong>{{$page}}/{{$max_page}}</strong> 转到第 <input name="page" id="page" type="text" class="sendbox_paging" /> 页
	</div>
	{{/if}}
  </div>

  <!-- <div id="output_info" style="height: 100px; clear:both; overflow:auto;" >
    <div id="title"></div>
    <div id="list"></div>
  </div> -->
  
  <iframe id="preview" name="preview" src="about:blank" width="100%" height="400px" scrolling="auto" frameborder="0"></iframe>
</div>

</div>
<!-- /main -->
<script type="text/javascript">
var pid='{{$pid}}';
var cid='{{$cid}}';
var catid='{{$catid}}';
var caid = '{{$caid}}';
var num = '{{$max_page}}';
</script>
<script type="text/javascript" src="../template/js/list.js"></script>

<div class="PromptBox" id="output_info" style="clear:both; overflow:auto;display:none;z-index:1000;">
  <div class="pb_column"><a href="javascript:hiderDIV();" class="pb_c_close">×</a>提示</div>
  <div class="pb_cont">
    <h1><img src="../template/images/icon_prompt.gif" width="28" height="30" align="absmiddle" />生成相关内容</h1>
    <div id="title"></div>
    <div id="list"></div>
  </div>
</div>
</body>
</html>